package com.safe.ele.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @program: StartCoding
 * @description:
 * @author: Feri(邢朋辉)
 * @create: 2021-01-05 17:50
 */
public class DateUtil {
    /**
     * 获取当前的日期详细*/
    public static String getTime(){
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
    }
    /**
     * 获取指定分钟后的日期*/
    public static Date addMinu(int m){
        Calendar calendar=Calendar.getInstance();
        calendar.add(Calendar.MINUTE,m);
        return calendar.getTime();
    }
}
